//
//  RootViewController.swift
//  KaKaWallet
//
//  Created by apple on 16/4/8.
//  Copyright © 2016年 ibendi. All rights reserved.
//

import UIKit

class KKOtherViewController: SuperViewController,UIScrollViewDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.hideNavigationBarBackItem()
        
      
      
        
    }
    func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
        print("velocity.y = \(velocity.y)");
        if velocity.y > 0 {
            self.navigationController?.navigationBar.isHidden = true
            
            UIView.animate(withDuration: 1, animations: { 
                
            })
        
        }else{
            self.navigationController?.navigationBar.isHidden = false
        }
    }
 
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
//    -(void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
//    {
//    NSLog(@"-------");
//    //    if (velocity.y > 0.0)
//    //    {
//    //        //向上滑动隐藏导航栏
//    //        self.navigationController.navigationBar.hidden = YES;
//    //    }else
//    //    {
//    //        //向下滑动显示导航栏
//    //        self.navigationController.navigationBar.hidden = NO;
//    //    }
//    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
